package org.rzp.ideaplug.statistic.statistic;

import lombok.extern.slf4j.Slf4j;
import org.rzp.ideaplug.statistic.R;

import javax.swing.*;

@Slf4j
public class StatisticThread implements Runnable {

    private String selectPath;

    private JProgressBar jProgressBar;
    private JLabel jProcessText;
    private JTextArea jTextAreaStatistic;

    public StatisticThread(JProgressBar jProgressBar, JLabel jProcessText, JTextArea jTextAreaStatistic) {
        this.jProgressBar = jProgressBar;
        this.jProcessText = jProcessText;
        this.jTextAreaStatistic = jTextAreaStatistic;
    }

    @Override
    public void run() {
        R.statistic = StatisticUtil.statistic(R.selectedPath, jProgressBar, jProcessText, jTextAreaStatistic);
    }


}
